home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 037a / tpfast40.zip / TPFAST.TXT < prev    next >
Text File  |  1991-11-18  |  85KB  |  2,478 lines

  1.  
  2.  
  3.                                   TPFAST  4.0
  4.                                   -----------
  5.  
  6.  
  7.                          'FAST Turbo Pascal library'
  8.  
  9.                 CopyRight (c) 1989,1990,1991    Steven Lutrov
  10.  
  11.     
  12.  
  13.  
  14.                                    CONTENTS
  15.  
  16.  
  17.     1.      Introduction . . . . . . . . . . . . . . . . . . . . . . . . .
  18.       1.1        Copyright . . . . . . . . . . . . . . . . . . . . . . . .
  19.       1.2        Technical support . . . . . . . . . . . . . . . . . . . .
  20.       1.3        Distribution  . . . . . . . . . . . . . . . . . . . . . .
  21.         1.3.1    P.D.N . . . . . . . . . . . . . . . . . . . . . . . . . .
  22.       1.4        Registration  . . . . . . . . . . . . . . . . . . . . . .
  23.  
  24.     2.      Function Descriptions  . . . . . . . . . . . . . . . . . . . .
  25.       2.1        Distribution Files  . . . . . . . . . . . . . . . . . . .
  26.  
  27.     3.      Quick reference  . . . . . . . . . . . . . . . . . . . . . . .
  28.       3.1        Bit wise  . . . . . . . . . . . . . . . . . . . . . . . .
  29.       3.2        Files . . . . . . . . . . . . . . . . . . . . . . . . . .
  30.       3.3        Keyboard  . . . . . . . . . . . . . . . . . . . . . . . .
  31.       3.4        Video . . . . . . . . . . . . . . . . . . . . . . . . . .
  32.       3.5        Text graphics . . . . . . . . . . . . . . . . . . . . . .
  33.       3.6        Strings . . . . . . . . . . . . . . . . . . . . . . . . .
  34.  
  35.     4.      Detail Reference . . . . . . . . . . . . . . . . . . . . . . .
  36.       4.1        Bit wise  . . . . . . . . . . . . . . . . . . . . . . . .
  37.       4.2        Files . . . . . . . . . . . . . . . . . . . . . . . . . .
  38.       4.3        Keyboard  . . . . . . . . . . . . . . . . . . . . . . . .
  39.       4.4        Video . . . . . . . . . . . . . . . . . . . . . . . . . .
  40.       4.5        Text graphics . . . . . . . . . . . . . . . . . . . . . .
  41.       4.6        Strings . . . . . . . . . . . . . . . . . . . . . . . . .
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.      1.  Introduction:
  50.      -----------------
  51.  
  52.  
  53.      If you are a serious  Pascal programmer  then then you are bound one
  54.      day to say to your self " i'm  in  the need for  some speed ! ". ( i
  55.      hope  the  makers   of   "Top Gun"  dont  mind me   saying   that) .
  56.  
  57.      The best way to do  this is  by  programming  in assembler.  Even  C
  58.      programmers find they   need to  use assembler  code  to enhance its
  59.      performance. I have written several routines that will help speed up
  60.      execution time remarkably. The profiler gave me results of  upto 80%
  61.      improvement  in  speed, for this reason i delibretaly have functions
  62.      that are similar or identical in operation to the standard run time.
  63.  
  64.      This toolkit will not give  you fancy  pull-down menus and exploding
  65.      windows etc, it was never intended to be that.   They  are low level
  66.      functions only, and may be used for building other functions that do
  67.      have fancy things ...... ( This is what I use it for ..)
  68.  
  69.  
  70.      The toolkit itself has  over 100 very  usefull and  highly optimised
  71.      low level functions.
  72.  
  73.  
  74.      The following is a list of all the assembler module files are  brief
  75.      description of the functions.
  76.  
  77.  
  78.  
  79.                TPFBIT.ASM     - mathematical bit manipulation
  80.                TPFFILE.ASM    - file manipulation routines
  81.                TPFSCRN.ASM    - graphics and crt routines
  82.                TPFKBD.ASM     - keyboard handling routines
  83.                TPFVIDEO.ASM   - screen handling routines
  84.                TPFSTR.ASM     - string manipulation routines
  85.  
  86.  
  87.  
  88.  
  89.  
  90.      All of these were tested  with is Borlands  Turbo Pascal 6.0  but i
  91.      cannot give a warranty of any kind, either expressed  or implied. I
  92.      only  guarantee  that this toolkit  will occupy  diskspace.  Please
  93.      read the CopyRight section for more information.
  94.  
  95.  
  96.      This  toolkit  is released  under the shareware  concept and is NOT
  97.      public domain,  freeware or  cripple ware,  please read section 1.3
  98.      for more information.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.      1.1.  CopyRight:
  107.      ----------------
  108.  
  109.      In no event shall Steven Lutrov be liable to you or anyone else for any
  110.      damages or costs, including, but not limited to, any lost profits, lost
  111.      savings,lost income, lost information, loss of life, loss of spouses
  112.      life, or any other incidental or consequential damages arising out of
  113.      the use or inability to use this library.
  114.  
  115.  
  116.  
  117.  
  118.  
  119.      1.2.  Technical Support:
  120.      ------------------------
  121.  
  122.      Technical support is best achieved if you have a modem and understand
  123.      the  BBS  scene.   You can dial up  The Software Parlour BBS where an
  124.      echo-mail area will be set up and messages can be posted, I or others
  125.      may be able to help etc etc.
  126.      You may also write to me at the address provided.
  127.  
  128.      I will also guarnatee that the latest version of this library will be
  129.      posted on The Software Parlour BBS.
  130.  
  131.  
  132.  
  133.  
  134.           BBS phone     -     +61-3-301-1877
  135.           Baud rates    -     V42bis,V32,V22bis,V22,V21
  136.  
  137.           BBS address   -     3:635/534@fido.org
  138.                               58:4100/34@intlnet
  139.  
  140.  
  141.           Postal Addresso -   Steven Lutrov.
  142.                               PO BOX 466
  143.                               Essendon, VIC 3040
  144.                               Australia
  145.  
  146.  
  147.  
  148.  
  149.      1.3.  Distribution:
  150.      -------------------
  151.  
  152.  
  153.      You are encouraged to  copy the toolkits files and  share  it  freely
  154.      with others.  You have the luxury of trying out the complete programs
  155.      at your own pace and in the comfort of  your  own home  or workplace.
  156.  
  157.  
  158.      After you have used the  toolkit for a  reasonable  evaluation period
  159.      you  should  either  discontinue  use  of  the  program or purchase a
  160.      licensed copy from the author.  Your support is important and greatly
  161.      appreciated.   with it, shareware  authors are  encouraged to  design
  162.      and  distribute new   products.   without it, a  great deal  of  high
  163.      quality, low cost software will cease to be available.
  164.  
  165.  
  166.  
  167.      in the  case of distribution  via any  telecommunications  link,  the
  168.      following must be done:
  169.  
  170.      *      z-modem  or  some other  error  checking protocol must be used
  171.      *      all  files (including documentation files) must be transferred
  172.             in a library or archive format.  this means the files have all
  173.             been combined into one file.
  174.  
  175.  
  176.  
  177.  
  178.      1.3.1.  P.D.N:
  179.      --------------
  180.  
  181.  
  182.      The  PDN  ( Programmers Distribution Network ) is   dedicated   to
  183.      supporting programmers all  over the  world  and has  many notable
  184.      programmers involved. The PDN distributes  source code, utilities,
  185.      libraries .., shareware, public domain and freeware etc.
  186.  
  187.  
  188.      This toolkit is also officially released to the PDN and shall meet
  189.      all the requirements required by PDN.
  190.  
  191.  
  192.      More information may be obtained from the following..
  193.  
  194.  
  195.      PDN International Coordinator    - Erik Vanriper
  196.                                         1:260/230@fido.org
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      1.4.  Registration:
  203.      -------------------
  204.  
  205.      Why pay at all?
  206.  
  207.  
  208.         1 ..  You receive full Assembly and Pascal source code, and may
  209.               modify it to suit you own needs.
  210.  
  211.         2 ..  Automatic subscription  to The Software Parlour BBS
  212.               (Home of TPFAST , and other programmers goodies).
  213.  
  214.         3 ..  Free upgrade offers
  215.  
  216.         6 ..  Your input and ideas help shape future upgrades with
  217.               acknowledgment  of your  contributions placed in the
  218.               source code.
  219.  
  220.         7 ..  A sense of pride and ownership in having honestly
  221.               participated   in   the   shareware    revolution
  222.  
  223.         8 ..  You help to keep software prices down by supporting a
  224.               distribution method which doesn't depend on expensive
  225.               advertising campaigns.
  226.  
  227.  
  228.      So please take it serously, and enjoy the fun  of  legally  sharing
  229.      good software with your friends and associates.
  230.  
  231.      Should you wish to register the toolkit , please print out the file
  232.      "register.txt" and fill in the relavent details.
  233.  
  234.  
  235.  
  236.      2. Descriptions:
  237.      ----------------
  238.  
  239.           The following sections will give a brief description of the
  240.           functions available.
  241.  
  242.  
  243.  
  244.      Bit wise
  245.      ---------
  246.  
  247.           These functions do bitwise  conversions such as  rotating  bits
  248.           left or right in given bytes or words.
  249.  
  250.           Other math related functions include converting bytes and words
  251.           to Hexadecimal strings.
  252.  
  253.  
  254.  
  255.      Files:
  256.      ------
  257.  
  258.  
  259.           These functions provide support for  file manipulation such  as
  260.           creating,  opening,  reading,  writing  and erasing files. Each
  261.           file that is created can have  any  attribute including  hidden
  262.           , system, read-only and sub-directory attributes. All the  file
  263.           fuctions are referenced by a unique (integer) handle.      This
  264.           handle is allocated by DOS. You can open files for "reading" or
  265.           "writing" or "reading and writing", and you can also change the
  266.           logical read/write position of a file.
  267.  
  268.           Additional functions are provided  that enable  you to to  read
  269.           and write to a specific disk sector, and enable and disable the
  270.           DOS verification flag.
  271.  
  272.  
  273.  
  274.  
  275.      Keyboard
  276.      --------
  277.  
  278.           These  functions will    just  about  cover  all  the low level
  279.           keyboard functions that you would ever need.
  280.           You can test if the  ALT,CTRL,INS  are down, test  if  the LEFT
  281.           SHIFT and RIGHT SHIFT or BOTH SHIFTS are down. Test if CAPSLOCK
  282.           ,SCROLLLOCK, NUMLOCK etc are set, or you can set them your self.
  283.  
  284.           You can make any key a push-on and release-off switch,    get a
  285.           scan code of any keypress, clear the keyboard buffer etc etc.
  286.  
  287.  
  288.  
  289.      Video
  290.      -----
  291.  
  292.           These functions perform  all the low level video that you would
  293.           ever need. All the  functions  write directly  to the VIDEO RAM
  294.           for optimum performance, and even support the old CGA  monitors
  295.           that have snow problems.
  296.  
  297.           There is a global variable in  the TPFAST.PAS unit file  in the
  298.           initialisation section that nedds to  be set for TRUE  if   you
  299.           have one of these old beasties, otherwise it should be left  as
  300.           FALSE.
  301.  
  302.           There is  also  support  provided  for  multiple  Video  Pages,
  303.           scrolling, cursor  movement,  screen  saving,  partial   screen
  304.           saving, changing the attributes on sections or  all the screen.
  305.  
  306.           Strings can be formatted , justified ,  centered  and   trimmed
  307.           before they are sent to the screen.  Strings  can be  displayed
  308.           vertcally.
  309.  
  310.           Strings can be  written  to  any  video  page  in     slectable
  311.           attributes at any position, in reverse or intense text.
  312.  
  313.           You may view or set the attributes of any char or string on the
  314.           screen.
  315.  
  316.           The blink bit may be  toggled to give you a  Yellow  backgroung
  317.           with a black foreground etc etc   ( something you dont see that
  318.           often ).
  319.  
  320.  
  321.  
  322.      Text Graphics
  323.      -------------
  324.  
  325.           These functions  will  do  low  level  text  screen    handling
  326.           including  saving, copying and restoring screen contents  to  a
  327.           buffer,  drawing  boxes,  filling  an  entire  screen  with   a
  328.           character.
  329.  
  330.           Moves a whole or part of  a  screen image in any direction, and
  331.           scroll the contents of a whole or  part  of  a screen vertcally
  332.           and horizontally.
  333.  
  334.  
  335.  
  336.      Strings
  337.      -------
  338.  
  339.           These functions perform very fast string manipulation, some are
  340.           identical  only  in  functionality to those provided by the run
  341.           time    library,   they  differ  significantly  in    execution
  342.           performance.
  343.  
  344.  
  345.           Functions include, changing and deleting characters,  comparing
  346.           strings,  returning  portions  of  strings,  case   conversions,
  347.           padding  strings,  searching  and  replacing  strings, creating
  348.           strings and counting words in a string.
  349.  
  350.  
  351.  
  352.  
  353.      2.1 Distribution Files:
  354.      -----------------------
  355.  
  356.           The following files should be include in the distribution
  357.           archive.
  358.  
  359.  
  360.  
  361.          REGISTER.TXT    - product registration form
  362.          TPFAST.TXT      - documentation
  363.          READ.ME         - release and special information file
  364.          TPFAST.PAS      - tpfast unit file
  365.  
  366.          TPFBIT.ASM      - math functions, assembler source
  367.          TPFFILE.ASM     - file functions, assembler source
  368.          TPFKBD.ASM      - keyboard functions, assembler source
  369.          TPFSCRN.ASM     - screen functions, assembler source
  370.          TPFSTR.ASM      - string functions, assmbler source
  371.          TPFVIDEO.ASM    - video functions, assembler source
  372.  
  373.          TPFBIT.OBJ      - math functions, assembler object code
  374.          TPFFILE.OBJ     - file functions, assembler object code
  375.          TPFKBD.OBJ      - keyboard functions, assembler object code
  376.          TPFSCRN.OBJ     - screen functions, assembler object code
  377.          TPFSTR.OBJ      - string functions, assmbler source
  378.          TPFVIDEO.OBJ    - video functions, assembler object code
  379.  
  380.  
  381.  
  382.          T_BIT.PAS       - example on bit functions
  383.          T_FILE.PAS      - example on file functions
  384.          T_KBD.PAS       - example on keyboard functions
  385.          T_SCRN.PAS      - example on screen functions
  386.          T_STR           - example on string functions
  387.  
  388.  
  389.  
  390.  
  391.  
  392.      3.  Quick Reference:
  393.      -------------------
  394.  
  395.  
  396.      3.1  Bitwise:
  397.      -------------
  398.  
  399.  
  400.      bytetohex         ...    Converts a byte to hex.
  401.      rotatebyteleft    ...    Rotate the bits of a byte left.
  402.      rotatebyteright   ...    Rotate the bits of a byte right.
  403.      rotatewordleft    ...    Rotate the bits of a word left.
  404.      rotatewordright   ...    Rotate the bits of a word right.
  405.      wordtohex         ...    Convert a word variable to hex.
  406.  
  407.  
  408.  
  409.  
  410.  
  411.      3.2  Files:
  412.      -----------
  413.  
  414.  
  415.      fclose            ...    Closes a file
  416.      fcreate           ...    Create a file with specified attributes.
  417.      ferase            ...    Erases a specified file
  418.      fopen             ...    Opens a file with specified access.
  419.      fread             ...    Reads a file to a buffer
  420.      fseek             ...    Change logical read/write position in
  421.                               a file
  422.      fwrite            ...    Writes to a file
  423.      getverify         ...    Returns the dos verification flag
  424.      readsector        ...    Reads from  a specified disk sector
  425.      setverify         ...    Change the the dos verification flag
  426.      writesector       ...    Writes to a specified disk sector.
  427.  
  428.  
  429.  
  430.  
  431.  
  432.      3.3  Keyboard:
  433.      --------------
  434.  
  435.  
  436.  
  437.      altkeydown        ...    Report if <alt> key is pressed
  438.      capslockdown      ...    Report if <caps lock> key is pressed
  439.      capslockon        ...    Report if <caps lock> key is currently on
  440.      clearbuffer       ...    Clears the keyboard buffer.
  441.      clearcapslock     ...    Clears the <caps lock> key.
  442.      clearins          ...    Clears the <ins> key.
  443.      clearnumlock      ...    Clears the <num lock> key.
  444.      clearscrolllock   ...    Clears the <scroll lock> key.
  445.      ctrlkeydown       ...    Report if <ctrl> key is pressed
  446.      ekeypressed       ...    Test if enhanced key is pressed.
  447.      freshchar         ...    Clears the keyboard buffer and returns the
  448.                               next keystroke.
  449.      getekey           ...    Get enhanced keystroke.
  450.      getkey            ...    Get keystroke.
  451.      inskeydown        ...    Report if <ins> key is pressed
  452.      inskeyon          ...    Report if <ins> key is currently on
  453.      keypause          ...    Makes any key a push-on and release-off
  454.                               switch.
  455.      lastkey           ...    return the last keyboard code from the
  456.                               buffer
  457.      leftshiftdown     ...    Report if <left shift> key is pressed
  458.      nextkey           ...    Extracts next keystroke from buffer without
  459.                               removing it.
  460.      numlockdown       ...    Report if <num lock> key is pressed
  461.      numlockon         ...    report if <num lock> key is currently on
  462.      rightshiftdown    ...    report if <right shift> key is pressed
  463.      scrolllockdown    ...    Report if <scroll lock> key is pressed
  464.      scrolllockon      ...    Report if <scroll lock> key currently on
  465.      setcapslock       ...    Set the <caps lock> key.
  466.      setins            ...    Set the <ins> key.
  467.      setnumlock        ...    Set the <num lock> key.
  468.      setscrolllock     ...    Set the <scroll lock> key.
  469.  
  470.  
  471.  
  472.      3.4  Video:
  473.      -----------
  474.  
  475.  
  476.  
  477.      blinkoff          ...    Sets text attribute to not blink.
  478.      blinkon           ...    Set text attribute to blink.
  479.      clearpage         ...    Clears a previously saved page from memory.
  480.      colourx           ...    Change the attribute of a column of text.
  481.      cursordown        ...    Move cursor down the specified number of
  482.                               rows.
  483.      cursorleft        ...    Move cursor left the specified number of
  484.                               columns.
  485.      cursoroff         ...    Turn cursor off, making it invisible.
  486.      cursoron          ...    Turn cursor on, making it visible.
  487.      cursorright       ...    Move cursor right a specified number of
  488.                               columns.
  489.      cursorup          ...    Move cursor up the specified number of rows.
  490.      dsp               ...    Writes a string directly to the video
  491.                               buffer.
  492.      dspat             ...    Writes a string directly to the video
  493.                               buffer at the specified coordinates in a
  494.                               given attribute.
  495.      dspcolour         ...    Writes a string directly to the video buffer
  496.                               in a given attribute.
  497.      dspend            ...    Write a string directly to the video buffer
  498.                               and clears the remaining characters.
  499.      dspjust           ...    Writes a string directly to the video buffer
  500.                               justifying it against a specified column and
  501.                               row position.
  502.      dspln             ...    Writes a string directly to the video buffer.
  503.      dsplncolour       ...    Writes a string directly to the video buffer
  504.                               in a given attribute.
  505.      dsppart           ...    Writes a portion of a string directly to the
  506.                               video buffer at specified coordinates an a
  507.                               specified  attribute.
  508.      dspvert           ...    Write and string vertically directly to the
  509.                               video buffer.
  510.      formatleft        ...    Writes a string directly to the video ram
  511.                               with left formatting.
  512.      formatright       ...    Writes a string directly to the video ram
  513.                               with right formatting.
  514.      getcolour         ...    Get the attribute of a specified screen
  515.                               position.
  516.      getpage           ...    Gets the current page.
  517.      intenseoff        ...    Set text attribute to intensity off.
  518.      intenseon         ...    Set text attribute to intense on.
  519.      normal            ...    Set text attribute to normal.
  520.      reverse           ...    Set text attribute to reverse.
  521.      rowcolour         ...    Change the attribute of a row of text.
  522.      screencolour      ...    Change the attribute of a boxed area.
  523.      setcolour         ...    Set the attribute of a character at the
  524.                               specified screen position.
  525.      setpage           ...    Set the a particiular page to be current
  526.                               and active.
  527.      swappage          ...    Exchage all memory allocated by a page to
  528.                               a buffer.
  529.  
  530.  
  531.  
  532.      3.5  Text graphics:
  533.      -------------------
  534.  
  535.  
  536.      copyclear         ...    Copy the contents of a screen area.
  537.      drawbox           ...    Draws a simple box on the screen.
  538.      fillscreen        ...    Fills an area of the screen with a specified
  539.                               character and attribute.
  540.      restorescreen     ...    Restores a previously saved screen image.
  541.      savescreen        ...    Saves a screen area.
  542.      screendown        ...    Moves an area of the screen down 1 row.
  543.      screenleft        ...    Moves an area of the screen left 2 columns.
  544.      screenright       ...    Moves an area of the screen right 2 columns.
  545.      screenup          ...    Moves an area of the screen up 1 row.
  546.      scrollx           ...    Scroll a defined area of the screen left or
  547.                               right.
  548.      scrolly           ...    Scroll a defined area of the screen up or down
  549.  
  550.  
  551.  
  552.  
  553.  
  554.      3.6  Strings:
  555.      -------------
  556.  
  557.  
  558.  
  559.  
  560.      changechar        ...    Changes every instance of a character in a
  561.                               string.
  562.      compare           ...    Compares two strings, ignoring case.
  563.      deletechar        ...    Deletes all occurances of a specified
  564.                               character.
  565.      deleteleft        ...    Deletes all characters from the begining of a
  566.                               string until a specified character is reached.
  567.      deleteright       ...    Deletes all characters from the end of a
  568.                               string until a specified character is reached.
  569.      leftend           ...    Return the left end of a string up to a
  570.                               specified character.
  571.      lowercase         ...    Convert a string to lowercase.
  572.      overwrite         ...    Overwrites part of a string with a substring.
  573.      padcentre         ...    Pads a string to a specified length at any
  574.                               position in a character.
  575.      padends           ...    Extends a string by padding it at both ends.
  576.      padleft           ...    Pads the begining of a string and extends
  577.                               it to a specified length.
  578.      padright          ...    Pads the end of a string and extends it a
  579.                               specified length.
  580.      replace           ...    Deletes a specified number of characters and
  581.                               inserts new substring.
  582.      rightend          ...    Return the right end of a string up to a
  583.                               specified character.
  584.      seekstring        ...    Searches for a substring within a string.
  585.      stringend         ...    Returns a specified number of characters
  586.                               from the end of a string.
  587.      stringof          ...    Makes a new string made up of repetitions of
  588.                               a substring.
  589.      uppercase         ...    Convert a string to uppercase.
  590.      wordcount         ...    Counts the number of words in a string.
  591.  
  592.  
  593.  
  594.  
  595.  
  596.      4.  Detailed Reference:
  597.      -----------------------
  598.  
  599.           The following text describes in detail all the functions in the
  600.           library.  When  I say functions I am  refering to procedures as
  601.           well as they are the same thing in my books. The layout is very
  602.           straight forward and needs no clarification. All the  functions
  603.           are listed in alpabetical order, so  should be  fairly easy  to
  604.           find.
  605.  
  606.  
  607.  
  608.  
  609.      4.1  Bit wise
  610.      -------------
  611.  
  612.  
  613.  
  614.      --------------------------------------------------------------------------
  615.      bytetohex
  616.  
  617.  
  618.      DESCRIPTION  ...    Converts a byte to hex.
  619.  
  620.      DECLERATION  ...    function bytetohex (num  :byte) :stype;
  621.  
  622.      PARAMETERS   ...    num         - the byte that is converted
  623.  
  624.      RETURNS      ...    A hexadecimal string represented by the byte.
  625.  
  626.  
  627.      --------------------------------------------------------------------------
  628.      rotatebyteleft
  629.  
  630.  
  631.      DESCRIPTION  ...    Rotate the bits of a byte left.
  632.  
  633.      DECLERATION  ...    function rotatebyteleft (num,nbits  :byte) :byte;
  634.  
  635.      PARAMETERS   ...    num         - the byte that is converted
  636.                          nbits       - number of bits to be rotated
  637.  
  638.      RETURNS      ...    The new modified byte.
  639.  
  640.  
  641.      --------------------------------------------------------------------------
  642.      rotatebyteright
  643.  
  644.  
  645.      DESCRIPTION  ...    Rotate the bits of a byte right.
  646.  
  647.  
  648.      DECLERATION  ...    function rotatebyteright (num,nbits  :byte) :byte;
  649.  
  650.  
  651.      PARAMETERS   ...    num         - the byte that is converted
  652.                          nbits       - number of bits to be rotated
  653.  
  654.      RETURNS      ...    The new modified byte.
  655.  
  656.  
  657.      --------------------------------------------------------------------------
  658.      rotatewordleft
  659.  
  660.  
  661.      DESCRIPTION  ...    Rotate the bits of a word left.
  662.  
  663.      DECLERATION  ...    function rotatewordleft (num : word; nbits  :byte)
  664.                                                  :word;
  665.  
  666.      PARAMETERS   ...    num         - the word that is converted
  667.                          nbits       - number of bits to be rotated
  668.  
  669.      RETURNS      ...    The new modified byte.
  670.  
  671.  
  672.      --------------------------------------------------------------------------
  673.      rotatewordright
  674.  
  675.  
  676.      DESCRIPTION  ...    Rotate the bits of a word right.
  677.  
  678.      DECLERATION  ...    function rotatewordright (num :word;
  679.                                                  nbits  :byte): word;
  680.  
  681.      PARAMETERS   ...    num         - the word that is converted
  682.                          nbits       - number of bits to be rotated
  683.  
  684.      RETURNS      ...    The new modified byte.
  685.  
  686.  
  687.      --------------------------------------------------------------------------
  688.      wordtohex
  689.  
  690.  
  691.      DESCRIPTION  ...    Convert a word variable to hex.
  692.  
  693.      DECLERATION  ...    function bytetohex (num : word) :stype;
  694.  
  695.  
  696.      PARAMETERS   ...    num       - the word theat is converted
  697.  
  698.      RETURNS      ...    A hexadecimal string represented by the word.
  699.  
  700.  
  701.  
  702.  
  703.  
  704.      4.2  Files:
  705.      -----------
  706.  
  707.  
  708.      --------------------------------------------------------------------------
  709.      fclose
  710.  
  711.      DESCRIPTION  ...    Closes a file
  712.  
  713.      DECLERATION  ...    function fclose(handle :integer) :boolean;
  714.  
  715.  
  716.      PARAMETERS   ...    handle      - the dos file handle.
  717.  
  718.      RETURNS      ...    true        - file closed ok
  719.                          false       - file didn't close ok
  720.  
  721.  
  722.      --------------------------------------------------------------------------
  723.      fcreate
  724.  
  725.      DESCRIPTION  ...    Create a file with specified attributes. The
  726.                          attributes are identical as those provided by the
  727.                          standard runtime but AnyFile is not valid. Use the
  728.                          logical or operator for combined attributes
  729.                          eg (0 or 2 or 5) etc etc...
  730.  
  731.      DECLERATION  ...    function fcreate(fname:string; attribute :integer)
  732.                                          :integer;
  733.  
  734.  
  735.      PARAMETERS   ...    fname       - the name of the file to be created
  736.                          attribute   - the attribute of the file to be created
  737.                                          0 = read only
  738.                                          1 = hidden
  739.                                          2 = system file
  740.                                          3 = volume label entry
  741.                                          4 = subdirectory
  742.                                          5 = archive file
  743.  
  744.      RETURNS     ...     >= 0        - ok (returns file handle)
  745.                          -3          - path not found
  746.                          -4          - too many open files
  747.                          -5          - access denied
  748.  
  749.  
  750.      --------------------------------------------------------------------------
  751.      ferase
  752.  
  753.      DESCRIPTION  ...    Erases a specified file
  754.  
  755.      DECLERATION  ...    function ferase(name:string) :integer;
  756.  
  757.  
  758.      PARAMETERS   ...    name        - the name of the file to be erased
  759.  
  760.      RETURNS      ...    0           - ok
  761.                         -2           - file not found
  762.                         -5           - access denied
  763.  
  764.      --------------------------------------------------------------------------
  765.      fopen
  766.  
  767.      DESCRIPTION  ...    Opens a file with specified access.
  768.  
  769.      DECLERATION  ...    function fopen(name :string; access :integer)
  770.                                        :integer;
  771.  
  772.  
  773.      PARAMETERS   ...    name        - the name of the file to be created
  774.                          access      - the access required for the file
  775.                                         0 - read only
  776.                                         1 - write
  777.                                         2 - read and write
  778.  
  779.      RETURNS     ...     >= 0        - ok (returns file handle)
  780.                          -2          - file not found
  781.                          -4          - too many open files
  782.                          -5          - access denied
  783.                          -12         - invalid access
  784.  
  785.  
  786.      --------------------------------------------------------------------------
  787.      fread
  788.  
  789.      DESCRIPTION  ...    Reads a file to a buffer
  790.  
  791.      DECLERATION  ...    function fread(handle :integer; amount:word; var buff)
  792.                                         :integer;
  793.  
  794.  
  795.      PARAMETERS   ...    handle      - handle identifier of the file
  796.                          amount      - number of bytes to read
  797.                                        record size <= $7FFF bytes
  798.                          buff        - pointer to address of data buffer
  799.  
  800.  
  801.      RETURNS      ...   >= 0         - ok (returns bytes read)
  802.                         -5           - access denied
  803.                         -6           - invalid handle
  804.  
  805.  
  806.      --------------------------------------------------------------------------
  807.      fseek
  808.  
  809.  
  810.      DESCRIPTION  ...    Change logical read/write position in a file
  811.  
  812.      DECLERATION  ...    function fseek (handle :integer; mode :integer;
  813.                                          offset:longint; var location:
  814.                                          longint) :boolean;
  815.  
  816.  
  817.      PARAMETERS   ...    handle      - handle of the file
  818.                          mode        - method code of pointer movement e.g.
  819.                                        0 - move from beginning of file
  820.                                        1 - move beyond current position
  821.                                        2 - move beyond end of file
  822.  
  823.                          offset      - offset in file relative to mode
  824.                          location    - new file pointer location after move
  825.  
  826.  
  827.      RETURNS      ...    true        - ok
  828.                          false       - something went wrong
  829.  
  830.  
  831.      --------------------------------------------------------------------------
  832.      fwrite
  833.  
  834.      DESCRIPTION  ...    Writes to a file
  835.  
  836.      DECLERATION  ...    function fwrite(handle :integer; nwrite:word;
  837.                                          var buff) :integer;
  838.  
  839.  
  840.      PARAMETERS   ...    handle      - handle identifier of the file
  841.                          nwrite      - number of bytes to write
  842.                                        record size <= $7FFF bytes
  843.  
  844.                          buff        - pointer to address of data buffer
  845.  
  846.  
  847.      RETURNS      ...    >= 0        - ok (returns bytes written)
  848.                          -5          - access denied
  849.                          -6          - invalid handle
  850.  
  851.  
  852.      --------------------------------------------------------------------------
  853.      getverify
  854.  
  855.      DESCRIPTION  ...    Returns the dos verification flag for disk writing
  856.  
  857.      DECLERATION  ...    function getverify  :boolean;
  858.  
  859.      PARAMETERS   ...    none
  860.  
  861.      RETURNS      ...    true         - verify flag is set
  862.                          false        - verify flag is clear
  863.  
  864.  
  865.      --------------------------------------------------------------------------
  866.      readsector
  867.  
  868.      DESCRIPTION  ...    Reads 512 bytes of a specified disk sector to a
  869.                          buffer
  870.  
  871.      DECLERATION  ...    procedure readsector(segment,offset,drive,sector,
  872.                                               number: word);
  873.  
  874.  
  875.  
  876.      PARAMETERS   ...    segment     - the segment of the array buffer object
  877.                          offest      - the offset for the segment
  878.                          drive       - the specified drive
  879.                                        1 = a, 2 = b, 3 = c etc.
  880.                          sector      - the logical sector number
  881.                          number      - number of sectors to read
  882.  
  883.  
  884.      TPFError    ...     0           - ok
  885.                          1           - invalid format on disk
  886.                          2           - write protection error
  887.                          3           - sector number is invalid
  888.                          4           - hardware failure
  889.  
  890.      --------------------------------------------------------------------------
  891.      setverify
  892.  
  893.  
  894.      DESCRIPTION  ...    Change the the dos verification flag for disk writing
  895.  
  896.      DECLERATION  ...    procedure setverify (setting: boolean);
  897.  
  898.  
  899.      PARAMETERS   ...    setting     - true for verification
  900.                                      - false for no verification
  901.  
  902.  
  903.      --------------------------------------------------------------------------
  904.      writesector
  905.  
  906.      DESCRIPTION  ...    Writes 512 bytes from a buffer to a specified disk
  907.                          sector.
  908.  
  909.      DECLERATION  ...    procedure writesector(segment,offset,drive,sector,
  910.                                                number :word);
  911.  
  912.  
  913.      PARAMETERS   ...    segment     - the segment of the array buffer object
  914.                          offest      - the offset for the segment
  915.                          drive       - the specified drive
  916.                                        1 = a, 2 = b, 3 = c etc.
  917.                          sector      - the logical sector number
  918.                          number      - number of sectors to read
  919.  
  920.  
  921.      TPFError     ...    0           - ok
  922.                          1           - invalid format on disk
  923.                          2           - write protection error
  924.                          3           - sector number is invalid
  925.                          4           - hardware failure
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.      4.3  Keyboard:
  937.      --------------
  938.  
  939.  
  940.  
  941.  
  942.  
  943.      --------------------------------------------------------------------------
  944.      altkeydown
  945.  
  946.  
  947.      DESCRIPTION  ...    Report if <alt> key is pressed
  948.  
  949.      DECLERATION  ...    function altkeydown  :boolean;
  950.  
  951.  
  952.      PARAMETERS   ...    none
  953.  
  954.      RETURNS      ...    true        - if <alt> key is pressed.
  955.                          false       - otherwise.
  956.  
  957.  
  958.      --------------------------------------------------------------------------
  959.      capslockdown
  960.  
  961.  
  962.      DESCRIPTION  ...    Report if <caps lock> key is pressed
  963.  
  964.      DECLERATION  ...    function capslockdown :boolean;
  965.  
  966.      PARAMETERS   ...    none
  967.  
  968.      RETURNS      ...    true        - if <caps lock> key is pressed.
  969.                          false       - otherwise.
  970.  
  971.  
  972.      --------------------------------------------------------------------------
  973.      capslockon
  974.  
  975.  
  976.      DESCRIPTION  ...    Report if <caps lock> key is currently on
  977.  
  978.      DECLERATION  ...    function capslockdon :boolean;
  979.  
  980.  
  981.      PARAMETERS   ...    none
  982.  
  983.      RETURNS      ...    true        - if <caps lock> key is set.
  984.                          false       - otherwise.
  985.  
  986.  
  987.  
  988.  
  989.      --------------------------------------------------------------------------
  990.      clearbuffer
  991.  
  992.  
  993.      DESCRIPTION  ...    Clears the keyboard buffer.
  994.  
  995.      DECLERATION  ...    procedure clearbuffer;
  996.  
  997.      PARAMETERS   ...    none
  998.  
  999.  
  1000.  
  1001.      --------------------------------------------------------------------------
  1002.      clearcapslock
  1003.  
  1004.  
  1005.      DESCRIPTION  ...    Clears the <caps lock> key.
  1006.  
  1007.      DECLERATION  ...    procedure clearcapslock;
  1008.  
  1009.      PARAMETERS   ...    none
  1010.  
  1011.  
  1012.      --------------------------------------------------------------------------
  1013.      clearins
  1014.  
  1015.  
  1016.      DESCRIPTION  ...    Clears the <ins> key.
  1017.  
  1018.      DECLERATION  ...    procedure clearins;
  1019.  
  1020.      PARAMETERS   ...    none
  1021.  
  1022.  
  1023.      --------------------------------------------------------------------------
  1024.      clearnumlock
  1025.  
  1026.  
  1027.      DESCRIPTION  ...    Clears the <num lock> key.
  1028.  
  1029.      DECLERATION  ...    procedure clearnumlock;
  1030.  
  1031.      PARAMETERS   ...    none
  1032.  
  1033.  
  1034.      --------------------------------------------------------------------------
  1035.      clearscrolllock
  1036.  
  1037.  
  1038.      DESCRIPTION  ...    Clears the <scroll lock> key.
  1039.  
  1040.      DECLERATION  ...    procedure clearscrolllock;
  1041.  
  1042.      PARAMETERS   ...    none
  1043.  
  1044.  
  1045.      --------------------------------------------------------------------------
  1046.      ctrlkeydown
  1047.  
  1048.  
  1049.      DESCRIPTION  ...    Report if <ctrl> key is pressed
  1050.  
  1051.      DECLERATION  ...    function ctrlkeydown :boolean;
  1052.  
  1053.      PARAMETERS   ...    none
  1054.  
  1055.      RETURNS      ...    true        - if <ctrl key> key is pressed.
  1056.                          false       - otherwise.
  1057.  
  1058.  
  1059.  
  1060.      --------------------------------------------------------------------------
  1061.      ekeypressed
  1062.  
  1063.  
  1064.      DESCRIPTION  ...    Checks if an enhanced key was pressed. This is
  1065.                          similar to keypressed by the standard run-time but
  1066.                          this function also supports enhanced keystrokes
  1067.                          such as the F11 and F12 keys.
  1068.  
  1069.      DECLERATION  ...    ekeypressed  :boolean;
  1070.  
  1071.      PARAMETERS   ...    none
  1072.  
  1073.      RETURNS      ...    true         - enhanced key was pressed
  1074.                          false        - enhanced key was not pressed
  1075.  
  1076.  
  1077.      --------------------------------------------------------------------------
  1078.      freshchar
  1079.  
  1080.  
  1081.      DESCRIPTION  ...    Clears the keyboard buffer and returns the next
  1082.                          keystroke.
  1083.  
  1084.      DECLERATION  ...    function freshchar :char;
  1085.  
  1086.      PARAMETERS   ...    none
  1087.  
  1088.      RETURNS      ...    The next keystroke. If an extended code was issued
  1089.                          then chr(0) is returned only.
  1090.  
  1091.  
  1092.      --------------------------------------------------------------------------
  1093.      getekey
  1094.  
  1095.  
  1096.      DESCRIPTION  ...    Gets a character from the keyboard buffer and waits
  1097.                          if the buffer is empty. This function will return
  1098.                          any extended keystrokes including F11 and F12  keys
  1099.                          provided the machine supports them. This function
  1100.                          will only work on (AT model 339,XT2,XT286,PS)
  1101.                          systems.
  1102.  
  1103.      DECLERATION  ...    function getekey   :word;
  1104.  
  1105.      PARAMETERS   ...    none
  1106.  
  1107.      RETURNS      ...    A unique word that holds the character and the scan
  1108.                          code. See the "const" section of the TPFAST.PAS file
  1109.                          for the key constants. You can also use the HI,LO
  1110.                          functions to extract the char and scan code.
  1111.  
  1112.                          e.g
  1113.  
  1114.                          HI(x) - returns the scan code
  1115.                          LO(x) - returns the char
  1116.  
  1117.  
  1118.  
  1119.      --------------------------------------------------------------------------
  1120.      getkey
  1121.  
  1122.  
  1123.      DESCRIPTION  ...    Gets a character from the keyboard buffer and waits
  1124.                          if the buffer is empty. This function will discard
  1125.                          any extended keystrokes returning only when a
  1126.                          non-extended keystroke is available. Use this if you
  1127.                          do not have an extended keyboard.
  1128.  
  1129.      DECLERATION  ...    function getkey   :word;
  1130.  
  1131.      PARAMETERS   ...    none
  1132.  
  1133.      RETURNS      ...    A unique word that holds the character and the scan
  1134.                          code. See the "const" section of the TPFAST.PAS file
  1135.                          for the key constants. You can also use the HI,LO
  1136.                          functions to extract the char and scan code.
  1137.  
  1138.                          e.g
  1139.  
  1140.                          HI(x) - returns the scan code
  1141.                          LO(x) - returns the char
  1142.  
  1143.  
  1144.      --------------------------------------------------------------------------
  1145.      inskeydown
  1146.  
  1147.  
  1148.      DESCRIPTION  ...    Report if <ins> key is pressed
  1149.  
  1150.      DECLERATION  ...    function inskeydown: boolean;
  1151.  
  1152.      PARAMETERS   ...    none
  1153.  
  1154.      RETURNS      ...    true        - if <ins key> key is pressed.
  1155.                          false       - otherwise.
  1156.  
  1157.  
  1158.      --------------------------------------------------------------------------
  1159.      inskeyon
  1160.  
  1161.  
  1162.      DESCRIPTION  ...    Report if <ins> key is currently on
  1163.  
  1164.      DECLERATION  ...    function inskeyon :boolean;
  1165.  
  1166.      PARAMETERS   ...    none
  1167.  
  1168.      RETURNS      ...    true        - if <ins key> key is on.
  1169.                          false       - otherwise.
  1170.  
  1171.  
  1172.      --------------------------------------------------------------------------
  1173.      keypause
  1174.  
  1175.  
  1176.      DESCRIPTION  ...    Makes any key a push-on and release-off switch. This
  1177.                          is a powerfull function that can differentiate a key
  1178.                          press and a key release.
  1179.  
  1180.      DECLERATION  ...    procedure keypause (code :char; ascii:
  1181.                                              boolean; wait_a,wait_b :byte);
  1182.  
  1183.  
  1184.  
  1185.      PARAMETERS   ...    code        -  the key that is used in keypause
  1186.                          ascii       -  true  - code is 1 byte ascii code
  1187.                                         false - code is second byte of extended code
  1188.  
  1189.                          wait_a      - time for buffer refresh signal on
  1190.                                        press
  1191.                          wait_b      - time for buffer refresh signal on
  1192.                                        release
  1193.  
  1194.  
  1195.      --------------------------------------------------------------------------
  1196.      lastkey
  1197.  
  1198.  
  1199.      DESCRIPTION  ...    Gets the last keyboard code from the keyboard buffer.
  1200.  
  1201.      DECLERATION  ...    function lastkey :char;
  1202.  
  1203.      PARAMETERS   ...    none
  1204.  
  1205.      RETURNS      ...    The last key press in the buffer. If the keyboard
  1206.                          buffer was empty the routine returns 255. If the
  1207.                          last keystroke was extended then chr(0) is returned
  1208.                          only.
  1209.  
  1210.  
  1211.      --------------------------------------------------------------------------
  1212.      leftshiftdown
  1213.  
  1214.      DESCRIPTION  ...    Report if <left shift> key is pressed
  1215.  
  1216.      DECLERATION  ...    function leftshiftdown :boolean;
  1217.  
  1218.      PARAMETERS   ...    none
  1219.  
  1220.      RETURNS      ...    true        - if <left shift key> key is pressed.
  1221.                          false       - otherwise.
  1222.  
  1223.  
  1224.      --------------------------------------------------------------------------
  1225.      nextkey
  1226.  
  1227.  
  1228.      DESCRIPTION  ...    Extracts next keystroke from buffer without removing
  1229.                          it.
  1230.  
  1231.      DECLERATION  ...    function nextkey :char;
  1232.  
  1233.      PARAMETERS   ...    none
  1234.  
  1235.      TPFError     ...    0           - normal ascii return
  1236.                          1           - extended code return
  1237.                          2           - buffer is empty
  1238.  
  1239.  
  1240.      --------------------------------------------------------------------------
  1241.      numlockdown
  1242.  
  1243.  
  1244.      DESCRIPTION  ...    Report if <num lock> key is pressed
  1245.  
  1246.      DECLERATION  ...    function numlockdown :boolean;
  1247.  
  1248.      PARAMETERS   ...    none
  1249.  
  1250.      RETURNS      ...    true        - if <num lock key> key is pressed.
  1251.                          false       - otherwise.
  1252.  
  1253.  
  1254.  
  1255.      --------------------------------------------------------------------------
  1256.      numlockon
  1257.  
  1258.  
  1259.      DESCRIPTION  ...    Report if <num lock> key is currently on
  1260.  
  1261.      DECLERATION  ...    function numlockon :boolean;
  1262.  
  1263.      PARAMETERS   ...    none
  1264.  
  1265.      RETURNS      ...    true        - if <num lock key> key is on.
  1266.                          false       - otherwise.
  1267.  
  1268.  
  1269.  
  1270.      --------------------------------------------------------------------------
  1271.      rightshiftdown
  1272.  
  1273.  
  1274.      DESCRIPTION  ...    Report if <right shift> key is pressed
  1275.  
  1276.      DECLERATION  ...    function rightshiftdown :boolean;
  1277.  
  1278.      PARAMETERS   ...    none
  1279.  
  1280.      RETURNS      ...    true        - if <right shift key> key is pressed.
  1281.                          false       - otherwise.
  1282.  
  1283.  
  1284.      --------------------------------------------------------------------------
  1285.      scrolllockdown
  1286.  
  1287.  
  1288.      DESCRIPTION  ...    Report if <scroll lock> key is pressed
  1289.  
  1290.      DECLERATION  ...    function scrolllockdown :boolean;
  1291.  
  1292.      PARAMETERS   ...    none
  1293.  
  1294.      RETURNS      ...    true        - if <scroll lock> is pressed.
  1295.                          false       - otherwise.
  1296.  
  1297.  
  1298.      --------------------------------------------------------------------------
  1299.      scrolllockon
  1300.  
  1301.  
  1302.      DESCRIPTION  ...    Report if <scroll lock> key currently on
  1303.  
  1304.      DECLERATION  ...    function scrolllockon :boolean;
  1305.  
  1306.      PARAMETERS   ...    none
  1307.  
  1308.      RETURNS      ...    true        - if <scroll lock> is on.
  1309.                          false       - otherwise.
  1310.  
  1311.  
  1312.      --------------------------------------------------------------------------
  1313.      setcapslock
  1314.  
  1315.  
  1316.      DESCRIPTION  ...    Set the <caps lock> key.
  1317.  
  1318.      DECLERATION  ...    procedure setcapslock;
  1319.  
  1320.      PARAMETERS   ...    none
  1321.  
  1322.  
  1323.      --------------------------------------------------------------------------
  1324.      setins
  1325.  
  1326.  
  1327.      DESCRIPTION  ...    Set the <ins> key.
  1328.  
  1329.      DECLERATION  ...    procedure setins;
  1330.  
  1331.      PARAMETERS   ...    none
  1332.  
  1333.      --------------------------------------------------------------------------
  1334.      setnumlock
  1335.  
  1336.  
  1337.      DESCRIPTION  ...    Set the <num lock> key.
  1338.  
  1339.      DECLERATION  ...    procedure setnumlock;
  1340.  
  1341.      PARAMETERS   ...    none
  1342.  
  1343.  
  1344.      --------------------------------------------------------------------------
  1345.      setscrolllock
  1346.  
  1347.  
  1348.      DESCRIPTION  ...    Set the <scroll lock> key.
  1349.  
  1350.      DECLERATION  ...    procedure setscrolllock;
  1351.  
  1352.      PARAMETERS   ...    none
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.      4.4  Video:
  1359.      -----------
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.      --------------------------------------------------------------------------
  1366.      blinkoff
  1367.  
  1368.      DESCRIPTION  ...    Sets text attribute to not blink. On EGA and VGA
  1369.                          system this gives you extra colours like black on
  1370.                          a yellow background.
  1371.  
  1372.      DECLERATION  ...    procedure blikoff;
  1373.  
  1374.      PARAMETERS   ...    none
  1375.  
  1376.  
  1377.      --------------------------------------------------------------------------
  1378.      blinkon
  1379.  
  1380.  
  1381.      DESCRIPTION  ...    Set text attribute to blink, this is the default
  1382.                          state of all video adaptors.
  1383.  
  1384.      DECLERATION  ...    procedure blinkon;
  1385.  
  1386.      PARAMETERS   ...    none
  1387.  
  1388.  
  1389.  
  1390.  
  1391.      --------------------------------------------------------------------------
  1392.      clearpage
  1393.  
  1394.  
  1395.      DESCRIPTION  ...    Clears a previously saved page from memory. See
  1396.                          getpage for more information.
  1397.  
  1398.      DECLERATION  ...    procedure clearpage(pagenumber,colour :byte);
  1399.  
  1400.  
  1401.      PARAMETERS   ...    pagenumber  - the page number
  1402.                          colour      - the colour attribute to which the page
  1403.                                        is to be  cleared.
  1404.  
  1405.  
  1406.  
  1407.      --------------------------------------------------------------------------
  1408.      colourx
  1409.  
  1410.  
  1411.      DESCRIPTION  ...    Change the attribute of a column of text.
  1412.                          The text is not altered in any way.
  1413.  
  1414.      DECLERATION  ...    procedure colourx (x,y,yy,colour :byte);
  1415.  
  1416.  
  1417.  
  1418.      PARAMETERS   ...    x          - column position coordinate
  1419.                          y          - row position coordinate
  1420.                          yy         - number of columns deep
  1421.                          colour     - the attribute
  1422.  
  1423.  
  1424.  
  1425.      --------------------------------------------------------------------------
  1426.      cursordown
  1427.  
  1428.  
  1429.      DESCRIPTION  ...    Move cursor down the specified number of rows.
  1430.  
  1431.      DECLERATION  ...    procedure cursordown(rows :integer);
  1432.  
  1433.  
  1434.      PARAMETERS   ...    rows        - number of rows to move down.
  1435.  
  1436.  
  1437.  
  1438.      --------------------------------------------------------------------------
  1439.      cursorleft
  1440.  
  1441.  
  1442.      DESCRIPTION  ...    Move cursor left the specified number of columns.
  1443.  
  1444.      DECLERATION  ...    procedure cursorleft(columns :integer);
  1445.  
  1446.  
  1447.      PARAMETERS   ...    columns       number of columns to move left.
  1448.  
  1449.  
  1450.  
  1451.      --------------------------------------------------------------------------
  1452.      cursoroff
  1453.  
  1454.  
  1455.      DESCRIPTION  ...    Turn cursor off, making it invisible.
  1456.  
  1457.      DECLERATION  ...    procedure cursoroff;
  1458.  
  1459.  
  1460.      PARAMETERS   ...    none
  1461.  
  1462.  
  1463.  
  1464.      --------------------------------------------------------------------------
  1465.      cursoron
  1466.  
  1467.  
  1468.      DESCRIPTION  ...    Turn cursor on, making it visible.
  1469.  
  1470.      DECLERATION  ...    procedure cursoron;
  1471.  
  1472.  
  1473.      PARAMETERS   ...    none
  1474.  
  1475.  
  1476.  
  1477.      --------------------------------------------------------------------------
  1478.      cursorright
  1479.  
  1480.  
  1481.      DESCRIPTION  ...    Move cursor right the specified number of columns.
  1482.  
  1483.      DECLERATION  ...    procedure cursorright(columns :integer);
  1484.  
  1485.  
  1486.  
  1487.      PARAMETERS   ...    columns     - number of columns to move right.
  1488.  
  1489.  
  1490.      --------------------------------------------------------------------------
  1491.      cursorup
  1492.  
  1493.  
  1494.      DESCRIPTION  ...    Move cursor up the specified number of rows.
  1495.  
  1496.      DECLERATION  ...    procedure cursorup (rows :integer);
  1497.  
  1498.  
  1499.  
  1500.      PARAMETERS   ...    rows        - number of rows to move up.
  1501.  
  1502.  
  1503.      --------------------------------------------------------------------------
  1504.      dsp
  1505.  
  1506.      DESCRIPTION  ...    Writes a string directly to the video buffer.
  1507.                          The string can be written to any page and the colour
  1508.                          attribute of the string is set to the global
  1509.                          variable textattr. No CR+LF is sent (see dspln).
  1510.  
  1511.      DECLERATION  ...    procedure dsp (s: stype);
  1512.  
  1513.  
  1514.      PARAMETERS   ...    s           - the string to write
  1515.  
  1516.  
  1517.  
  1518.      --------------------------------------------------------------------------
  1519.      dspat
  1520.  
  1521.  
  1522.      DESCRIPTION  ...    Writes a string directly to the video buffer at the
  1523.                          specified coordinates in a given attribute.
  1524.                          The string can be written to any page. No CR+LF is
  1525.                          sent (see dspln).
  1526.  
  1527.      DECLERATION  ...    procedure dspat(s: stype; x,y,colour :byte);
  1528.  
  1529.  
  1530.      PARAMETERS   ...    s           - the string to write
  1531.                          x           - the column location position
  1532.                          y           - the row location position
  1533.                          colour      - the colour attribute of the string
  1534.  
  1535.  
  1536.      --------------------------------------------------------------------------
  1537.      dspcolour
  1538.  
  1539.  
  1540.      DESCRIPTION  ...    Writes a string directly to the video buffer in a
  1541.                          given attribute.
  1542.                          The string can be written to any page.
  1543.                          No CR+LF is sent (see dspln).
  1544.  
  1545.      DECLERATION  ...    procedure dspcolour(s: stype; colour :byte);
  1546.  
  1547.  
  1548.  
  1549.      PARAMETERS   ...    s           - the string to write
  1550.                          colour      - the colour attribute of the string
  1551.  
  1552.  
  1553.      --------------------------------------------------------------------------
  1554.      dspend
  1555.  
  1556.  
  1557.      DESCRIPTION  ...    Write a string directly to the video buffer and
  1558.                          clears the remaining characters following the
  1559.                          string until the length is met.
  1560.  
  1561.  
  1562.      DECLERATION  ...    procedure dspend(s: stype; x,y,length,colour :byte);
  1563.  
  1564.  
  1565.  
  1566.      PARAMETERS   ...    s           - the string to write
  1567.                          x           - the column position starting coordinate
  1568.                          y           - the row position starting coordinate
  1569.                          length      - the length to end the string at
  1570.  
  1571.  
  1572.      --------------------------------------------------------------------------
  1573.      dspjust
  1574.  
  1575.  
  1576.      DESCRIPTION  ...    Writes a string directly to the video buffer
  1577.                          justifying it against a specified column and row
  1578.                          position.
  1579.  
  1580.      DECLERATION  ...    procedure dspjust(s: stype; x,y,colour :byte);
  1581.  
  1582.  
  1583.      PARAMETERS   ...    s           - the string to write
  1584.                          x           - the column staring position
  1585.                          y           - the row staring position
  1586.                          colour      - the colour attribute of the string
  1587.  
  1588.      --------------------------------------------------------------------------
  1589.      dspln
  1590.  
  1591.  
  1592.      DESCRIPTION  ...    Writes a string directly to the video buffer.
  1593.                          The string can be written to any page and the colour
  1594.                          attribute of the string is set to the global
  1595.                          variable textattr. A CR+LF is sent is appended
  1596.                          to the string.
  1597.  
  1598.  
  1599.      DECLERATION  ...    procedure dspln(s: stype);
  1600.  
  1601.      PARAMETERS   ...    s           - the string to write
  1602.  
  1603.  
  1604.  
  1605.      --------------------------------------------------------------------------
  1606.      dsplncolour
  1607.  
  1608.  
  1609.      DESCRIPTION  ...    Writes a string directly to the video buffer in a
  1610.                          given attribute. The string can be written to any
  1611.                          page. A CR+LF is appended to the string.
  1612.  
  1613.      DECLERATION  ...    procedure dsplncolour(s: stype; colour :byte);
  1614.  
  1615.  
  1616.      PARAMETERS   ...    s           - the string to write
  1617.                          colour      - the colour attribute of the string (0-255)
  1618.  
  1619.  
  1620.  
  1621.      --------------------------------------------------------------------------
  1622.      dsppart
  1623.  
  1624.  
  1625.      DESCRIPTION  ...    Writes a portion of a string directly to the video
  1626.                          buffer at specified coordinates an a specified
  1627.                          attribute.
  1628.  
  1629.      DECLERATION  ...    procedure dsppart (s: stype; start,numch,
  1630.                                                x,y,colour :byte);
  1631.  
  1632.  
  1633.      PARAMETERS   ...    s           - the string to write
  1634.                          start       - starting position in s
  1635.                          numch       - number of characters to write
  1636.                          x           - the column staring position
  1637.                          y           - the row starting position
  1638.                          colour      - the colour attribute of the string
  1639.  
  1640.  
  1641.      --------------------------------------------------------------------------
  1642.      dspvert
  1643.  
  1644.  
  1645.      DESCRIPTION  ...    Write and string vertically directly to the video
  1646.                          buffer.
  1647.  
  1648.      DECLERATION  ...    procedure dspvert(s: stype; x,y,colour :byte);
  1649.  
  1650.  
  1651.  
  1652.      PARAMETERS   ...    s           - the string to write
  1653.                          x           - the column staring position
  1654.                          y           - the row staring position
  1655.                          colour      - the colour attribute of the string
  1656.  
  1657.  
  1658.      --------------------------------------------------------------------------
  1659.      formatleft
  1660.  
  1661.  
  1662.      DESCRIPTION  ...    Writes a string directly to the video ram with
  1663.                          formatting. The string is written to the right of
  1664.                          the cursor. If how_many is a positive value then
  1665.                          cursor is offset to the right from the initial
  1666.                          position. if how_many is negative then the cursor
  1667.                          is moved to a position directly below the starting
  1668.                          point.
  1669.  
  1670.      DECLERATION  ...    procedure formatleft(s: stype; how_many :integer;
  1671.                                               colour :byte);
  1672.  
  1673.  
  1674.      PARAMETERS   ...    s           - the string to write
  1675.                          how_many    - distance between starting cursor
  1676.                                        position and return cursor position.
  1677.                          colour      - the colour attribute
  1678.  
  1679.  
  1680.  
  1681.      --------------------------------------------------------------------------
  1682.      formatright
  1683.  
  1684.  
  1685.      DESCRIPTION  ...    Writes a string directly to the video ram with
  1686.                          formatting. The string is written to the left of
  1687.                          the initial cursor position so the final character
  1688.                          is at the starting position. If how_many is a
  1689.                          positive value then cursor is offset to the right
  1690.                          from the initial position. If how_many is negative
  1691.                          then the cursor is moved to a position directly
  1692.                          below the starting point.
  1693.  
  1694.      DECLERATION  ...    procedure formatright (s: stype; how_many :integer;
  1695.                                                 colour :byte);
  1696.  
  1697.  
  1698.      PARAMETERS   ...    s           - the string to write
  1699.                          how_many    - distance between starting cursor
  1700.                                        position and return cursor position.
  1701.                          colour      - the colour attribute
  1702.  
  1703.  
  1704.  
  1705.      --------------------------------------------------------------------------
  1706.      getcolour
  1707.  
  1708.  
  1709.      DESCRIPTION  ...    Get the attribute of a specified screen position.
  1710.  
  1711.      DECLERATION  ...    function  getcolour(x,y :byte) :byte;
  1712.  
  1713.  
  1714.      PARAMETERS   ...    x           - column starting position
  1715.                          y           - row starting position
  1716.  
  1717.      RETURNS      ...    The attribute
  1718.  
  1719.  
  1720.      --------------------------------------------------------------------------
  1721.      getpage
  1722.  
  1723.  
  1724.      DESCRIPTION  ...    Gets the current page.
  1725.  
  1726.      DECLERATION  ...    function  getpage :integer;
  1727.  
  1728.      PARAMETERS   ...    none
  1729.  
  1730.      RETURNS      ...    The current active page.
  1731.  
  1732.  
  1733.      --------------------------------------------------------------------------
  1734.      intenseoff
  1735.  
  1736.      DESCRIPTION  ...    Set text attribute to intensity off.
  1737.  
  1738.      DECLERATION  ...    procedure intenseoff;
  1739.  
  1740.      PARAMETERS   ...    none
  1741.  
  1742.  
  1743.  
  1744.      --------------------------------------------------------------------------
  1745.      intenseon
  1746.  
  1747.  
  1748.      DESCRIPTION  ...    Set text attribute to intense on.
  1749.  
  1750.      DECLERATION  ...    procedure intenseon;
  1751.  
  1752.      PARAMETERS   ...    none
  1753.  
  1754.  
  1755.      --------------------------------------------------------------------------
  1756.      normal
  1757.  
  1758.  
  1759.      DESCRIPTION  ...    Set text attribute to normal.
  1760.  
  1761.      DECLERATION  ...    procedure normal;
  1762.  
  1763.      PARAMETERS   ...    none
  1764.  
  1765.  
  1766.  
  1767.      --------------------------------------------------------------------------
  1768.      reverse
  1769.  
  1770.  
  1771.      DESCRIPTION  ...    Set text attribute to reverse.
  1772.  
  1773.      DECLERATION  ...    procedure reverse;
  1774.  
  1775.      PARAMETERS   ...    none
  1776.  
  1777.  
  1778.  
  1779.      --------------------------------------------------------------------------
  1780.      rowcolour
  1781.  
  1782.  
  1783.      DESCRIPTION  ...    Change the attribute of a row of text, the text is
  1784.                          not altered in any way.
  1785.  
  1786.      DECLERATION  ...    procedure rowcolour(x,y,xx,colour :byte);
  1787.  
  1788.  
  1789.  
  1790.      PARAMETERS   ...    x           - top left column position
  1791.                          y           - top left row position
  1792.                          xx          - number of rows affecting attribute
  1793.                          colour      - the attribute
  1794.  
  1795.  
  1796.      --------------------------------------------------------------------------
  1797.      screencolour
  1798.  
  1799.  
  1800.      DESCRIPTION  ...    Change the attribute of a boxed area, the text is
  1801.                          not altered in any way.
  1802.  
  1803.      DECLERATION  ...    procedure screencolour(x,y,xx,yy,colour :byte);
  1804.  
  1805.  
  1806.  
  1807.      PARAMETERS   ...    x           - column position coordinate
  1808.                          y           - row position coordinate
  1809.                          xx          - number of columns wide
  1810.                          yy          - number of rows deep
  1811.                          colour      - the attribute
  1812.  
  1813.  
  1814.      --------------------------------------------------------------------------
  1815.      setcolour
  1816.  
  1817.  
  1818.      DESCRIPTION  ...    Set the attribute of a character at the specified
  1819.                          screen position. The text is not altered in any
  1820.                          way.
  1821.  
  1822.      DECLERATION  ...    procedure setcolour(x,y,colour :byte);
  1823.  
  1824.      PARAMETERS   ...    x           - column starting position
  1825.                          y           - row starting position
  1826.                          colour      - the attribute
  1827.  
  1828.  
  1829.      --------------------------------------------------------------------------
  1830.      setpage
  1831.  
  1832.  
  1833.      DESCRIPTION  ...    Set the a particiular page to be current and active.
  1834.                          VGA and EGA cards support 8 pages, that is 0-7, and
  1835.                          MONOCHROME cards support only one page.
  1836.  
  1837.      DECLERATION  ...    procedure setpage(pagenumber :integer);
  1838.  
  1839.      PARAMETERS   ...    pagenumber  - the page number
  1840.  
  1841.  
  1842.      --------------------------------------------------------------------------
  1843.      swappage
  1844.  
  1845.  
  1846.      DESCRIPTION  ...    Exchage all memory allocated by a page to a buffer.
  1847.                          Also see getpage for more information.
  1848.  
  1849.      DECLERATION  ...    procedure swappage(box :pointer; pagenumber :byte);
  1850.  
  1851.  
  1852.      PARAMETERS   ...    box         - array for storing the image
  1853.                          pagenumber  - the page number
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.      4.5  Text graphics:
  1863.      -------------------
  1864.  
  1865.  
  1866.  
  1867.      --------------------------------------------------------------------------
  1868.      copyclear
  1869.  
  1870.  
  1871.      DESCRIPTION  ...    Copy the contents of a screen area into a byte array
  1872.                          and then clear the area. This is a much faster
  1873.                          method but is equivalent to  calling the savescreen
  1874.                          and clrscr procedures.
  1875.  
  1876.      DECLERATION  ...    procedure copyclear (box :pointer; x,y,xx,yy,colour
  1877.                                              :byte);
  1878.  
  1879.  
  1880.      PARAMETERS   ...    box         - byte array pointer that holds screen
  1881.                                        contents
  1882.                          x           - the top left column position
  1883.                          y           - the top left row position
  1884.                          xx          - the number of colums of the screen
  1885.                          yy          - the number of rows of the screen
  1886.                          colour      - the colour attribute of the area.
  1887.  
  1888.  
  1889.  
  1890.      --------------------------------------------------------------------------
  1891.      drawbox
  1892.  
  1893.  
  1894.      DESCRIPTION  ...    Draws a simple box on the screen, using double or
  1895.                          single lines or a combination. If a combination is
  1896.                          used the corner chars are automatically calculated.
  1897.  
  1898.      DECLERATION  ...    procedure drawbox (chx,chy :char; x,y,xx,yy,
  1899.                                            colour :byte);
  1900.  
  1901.  
  1902.      PARAMETERS   ...    chx         - the character used for horizontal lines
  1903.                                        'd','D'  - double lines
  1904.                                        's','S'  - single lines
  1905.                          chy         - the character used for vertical lines
  1906.                                        'd','D'  - double lines
  1907.                                        's','S'  - single lines
  1908.                          x           - the top left column position
  1909.                          y           - the top left row position
  1910.                          xx          - the number of colums of the screen
  1911.                          yy          - the number of rows of the screen
  1912.                          colour      - the colour attribute of the characters.
  1913.  
  1914.  
  1915.      --------------------------------------------------------------------------
  1916.      fillscreen
  1917.  
  1918.  
  1919.      DESCRIPTION  ...    Fills an area of the screen with a specified
  1920.                          character and attribute.
  1921.  
  1922.      DECLERATION  ...    procedure fillscreen (ch :char; x,y,xx,yy,
  1923.                                                colour :byte);
  1924.  
  1925.  
  1926.      PARAMETERS   ...    ch          - the character used for filling
  1927.                          x           - the top left column position
  1928.                          y           - the top left row position
  1929.                          xx          - the number of colums of the screen
  1930.                          yy          - the number of rows of the screen
  1931.                          colour      - the colour attribute of the character.
  1932.  
  1933.  
  1934.  
  1935.      --------------------------------------------------------------------------
  1936.      restorescreen
  1937.  
  1938.  
  1939.      DESCRIPTION  ...    Restores a previously saved screen image to the
  1940.                          current screen. See the savescreen procedure before
  1941.                          using this.
  1942.  
  1943.  
  1944.      DECLERATION  ...    procedure restorescreen (box :pointer;
  1945.                                                   x,y,xx,yy :byte);
  1946.  
  1947.  
  1948.      PARAMETERS   ...    box         - byte array pointer that holds screen
  1949.                                        contents
  1950.                          x           - the top left column position
  1951.                          y           - the top left row position
  1952.                          xx          - the number of colums of the screen
  1953.                          yy          - the number of rows of the screen
  1954.  
  1955.  
  1956.  
  1957.      --------------------------------------------------------------------------
  1958.      savescreen
  1959.  
  1960.  
  1961.      DESCRIPTION  ...    Copy the contents of a screen area into a byte array
  1962.                          including screen attributes. The 'box' pointer
  1963.                          should be an array of of bytes the size of the screen
  1964.                          you wish to save, keeping in mind one byte is used
  1965.                          for the character, and one byte for the attribute.
  1966.                          eg. to save the whole screen box should be an array
  1967.                          [1..4000] of byte. Remember to pass the address of
  1968.                          the box pointer  eg  svaescreen(@boxptr,1,1,80,25);
  1969.  
  1970.  
  1971.      DECLERATION  ...    procedure savescreen(box :pointer; x,y,xx,yy :byte);
  1972.  
  1973.  
  1974.      PARAMETERS   ...    box         - byte array pointer that holds screen
  1975.                                        contents
  1976.                          x           - the top left column position
  1977.                          y           - the top left row position
  1978.                          xx          - the number of columns of the screen
  1979.                          yy          - the number of rows of the screen
  1980.  
  1981.  
  1982.  
  1983.      --------------------------------------------------------------------------
  1984.      screendown
  1985.  
  1986.  
  1987.      DESCRIPTION  ...    Moves an area of the screen down 1 row. The screen
  1988.                          area should be saved prior to calling this routine
  1989.                          with savescreen so the box pointer is initialised
  1990.                          correctly. Variables x and y are updated to the new
  1991.                          coordinates.
  1992.  
  1993.      DECLERATION  ...    procedure screendown (box :pointer; var x,y:
  1994.                                           byte; xx,yy :byte);
  1995.  
  1996.  
  1997.      PARAMETERS   ...    box         - byte array pointer that holds screen
  1998.                                        contents
  1999.                          x           - the top left column position of the
  2000.                                        screen
  2001.                          y           - the top left row position of the screen
  2002.                          xx          - the number of colums of the screen
  2003.                          yy          - the number of rows of the screen
  2004.  
  2005.  
  2006.  
  2007.      --------------------------------------------------------------------------
  2008.      screenleft
  2009.  
  2010.  
  2011.      DESCRIPTION  ...    Moves an area of the screen left 2 columns. The
  2012.                          screen area should be saved prior to calling this
  2013.                          routine with savescreen so the box pointer is
  2014.                          initialised correctly. Variables x and y are updated
  2015.                          to the new coordinates.
  2016.  
  2017.  
  2018.      DECLERATION  ...    procedure screenleft (box :pointer; var x,y :byte;
  2019.                                              xx,yy :byte);
  2020.  
  2021.  
  2022.      PARAMETERS   ...    box         - byte array pointer that holds screen
  2023.                                        contents
  2024.                          x           - the top left column position of the
  2025.                                        screen
  2026.                          y           - the top left row position of the screen
  2027.                          xx          - the number of colums of the screen
  2028.                          yy          - the number of rows of the screen
  2029.  
  2030.  
  2031.  
  2032.      --------------------------------------------------------------------------
  2033.      screenright
  2034.  
  2035.  
  2036.      DESCRIPTION  ...    Moves an area of the screen right 2 columns. the
  2037.                          screen area should be saved prior to calling this
  2038.                          routine with savescreen so the box pointer is
  2039.                          initialised correctly. Variables x and y are updated
  2040.                          to the new coordinates.
  2041.  
  2042.  
  2043.      DECLERATION  ...    procedure screenright (box :pointer; var x,y:byte;
  2044.                                               xx,yy :byte);
  2045.  
  2046.  
  2047.      PARAMETERS   ...    box          - byte array pointer that holds screen
  2048.                                         contents
  2049.                          x            - the top left column position of the
  2050.                                         screen
  2051.                          y            - the top left row position of the screen
  2052.                          xx           - the number of colums of the screen
  2053.                          yy           - the number of rows of the screen
  2054.  
  2055.  
  2056.  
  2057.      --------------------------------------------------------------------------
  2058.      screenup
  2059.  
  2060.  
  2061.      DESCRIPTION  ...    Moves an area of the screen up 1 row. The screen area
  2062.                          should be saved prior to calling this routine with
  2063.                          savescreen so the box pointer is initialised
  2064.                          correctly. Variables x and y are updated to the new
  2065.                          coordinates.
  2066.  
  2067.      DECLERATION  ...    procedure screenup (box :pointer; var x,y:
  2068.                                           byte; xx,yy :byte);
  2069.  
  2070.  
  2071.      PARAMETERS   ...    x           - the top left column position of the
  2072.                                        screen
  2073.                          y           - the top left row position of the
  2074.                                        screen
  2075.                          xx          - the number of colums of the screen
  2076.                          yy          - the number of rows of the screen
  2077.  
  2078.  
  2079.  
  2080.      --------------------------------------------------------------------------
  2081.      scrollx
  2082.  
  2083.  
  2084.      DESCRIPTION  ...    Scroll a defined area of the screen left or right and
  2085.                          clears the remaining lines in a given attribute.
  2086.  
  2087.  
  2088.      DECLERATION  ...    procedure scrollx (where :char; x,y,xx,yy,
  2089.                                              cols,colour :byte);
  2090.  
  2091.  
  2092.      PARAMETERS   ...    where       -  the direction characters e.g.
  2093.                                         'l','L'   -  scroll left
  2094.                                         'r','R'   -  scroll right
  2095.                          x           - the top left column position
  2096.                          y           - the top left row position
  2097.                          xx          - the number of colums of the screen
  2098.                          yy          - the number of rows of the screen
  2099.                          cols        - the number of columns to be shifted
  2100.                          colour      - the attribute to clear empty lines
  2101.  
  2102.  
  2103.      --------------------------------------------------------------------------
  2104.      scrolly
  2105.  
  2106.  
  2107.      DESCRIPTION  ...    Scroll a defined area of the screen up or down and
  2108.                          clears the remaining lines in a given attribute.
  2109.  
  2110.  
  2111.      DECLERATION  ...    procedure scrolly (where :char; x,y,xx,
  2112.                                              yy,lines,colour :byte);
  2113.  
  2114.  
  2115.      PARAMETERS   ...    where       - the direction characters e.g.
  2116.                                        'u','U'   -  scroll up
  2117.                                        'd','D'   -  scroll down
  2118.                          x           - the top left column position
  2119.                          y           - the top left row position
  2120.                          xx          - the number of colums of the screen
  2121.                          yy          - the number of rows of the screen
  2122.                          lines       - the number of rows to be shifted
  2123.                          colour      - the attribute to clear empty columns
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.      4.6  Strings:
  2134.      -------------
  2135.  
  2136.  
  2137.  
  2138.  
  2139.  
  2140.  
  2141.      --------------------------------------------------------------------------
  2142.      changechar
  2143.  
  2144.  
  2145.      DESCRIPTION  ...    Changes every instance of a character in a string.
  2146.  
  2147.      DECLERATION  ...    procedure changechar(var s: stype;
  2148.                                               search,replace :char);
  2149.  
  2150.  
  2151.      PARAMETERS   ...    s           - the string to be manipulated
  2152.                          search      - character that is searched
  2153.                          replace     - character that replaces search
  2154.  
  2155.      TPFError     ...    0           - ok
  2156.                          1           - character not found
  2157.  
  2158.  
  2159.      --------------------------------------------------------------------------
  2160.      compare
  2161.  
  2162.  
  2163.      DESCRIPTION  ...    Compares two strings, ignoring case.
  2164.  
  2165.      DECLERATION  ...    function compare(s1,s2: stype): boolean;
  2166.  
  2167.  
  2168.      PARAMETERS   ...    s1          - first compare string
  2169.                          s2          - second compare string
  2170.  
  2171.  
  2172.      RETURNS      ...    true        - strings are the same
  2173.                          false       - strings are not the same
  2174.  
  2175.  
  2176.  
  2177.      --------------------------------------------------------------------------
  2178.      deletechar
  2179.  
  2180.  
  2181.      DESCRIPTION  ...    Deletes all occurances of a specified character.
  2182.  
  2183.      DECLERATION  ...    procedure deletechar(var s: stype; ch :char);
  2184.  
  2185.  
  2186.      PARAMETERS   ...    s           - the string to be manipulated.
  2187.                          ch          - the character to be deleted.
  2188.  
  2189.      TPFError     ...    0           - ok
  2190.                          1           - character not found
  2191.  
  2192.  
  2193.      --------------------------------------------------------------------------
  2194.      deleteleft
  2195.  
  2196.  
  2197.      DESCRIPTION  ...    Deletes all characters from the begining of a string
  2198.                          until a specified character is reached.
  2199.  
  2200.      DECLERATION  ...    procedure deleteleft(var s: stype; border :char);
  2201.  
  2202.  
  2203.      PARAMETERS   ...    s           - the string to be manipulated.
  2204.                          border      - the character at which deletion stops
  2205.  
  2206.      TPFError     ...    0           - ok
  2207.                          1           - character not found
  2208.  
  2209.  
  2210.      --------------------------------------------------------------------------
  2211.      deleteright
  2212.  
  2213.  
  2214.      DESCRIPTION  ...    Deletes all characters from the end of a string
  2215.                          until a specified character is reached.
  2216.  
  2217.      DECLERATION  ...    procedure deleteright(var s: stype; border :char);
  2218.  
  2219.  
  2220.      PARAMETERS   ...    s           - the string to be manipulated.
  2221.                          border      - the character at which deletion stops
  2222.  
  2223.      TPFError     ...    0           - ok
  2224.                          1           - character not found
  2225.  
  2226.  
  2227.      --------------------------------------------------------------------------
  2228.      leftend
  2229.  
  2230.  
  2231.      DESCRIPTION  ...    Return the left end of a string up to a specified
  2232.                          character.
  2233.  
  2234.      DECLERATION  ...    function leftend(var s: stype; border :char): stype;
  2235.  
  2236.  
  2237.      PARAMETERS   ...    s           - the string to be manipulated.
  2238.                          border      - the character at which the search stops
  2239.  
  2240.      RETURNS      ...    The new string.
  2241.  
  2242.      TPFError     ...    0           - ok
  2243.                          1           - character not found
  2244.  
  2245.  
  2246.      --------------------------------------------------------------------------
  2247.      lowercase
  2248.  
  2249.  
  2250.      DESCRIPTION  ...    Convert a string to lowercase.
  2251.  
  2252.      DECLERATION  ...    procedure lowercase(var s: stype);
  2253.  
  2254.      PARAMETERS   ...    s           - the string to be manipulated.
  2255.  
  2256.  
  2257.      --------------------------------------------------------------------------
  2258.      overwrite
  2259.  
  2260.  
  2261.      DESCRIPTION  ...    Overwrites part of a string with a substring.
  2262.  
  2263.      DECLERATION  ...    procedure overwrite (var s: stype; subs: stype;
  2264.                                               position :integer);
  2265.  
  2266.  
  2267.                          s           - the string to be manipulated.
  2268.                          subs        - the string that replaces s
  2269.                          position    - the position at which overwriting
  2270.                                        begins.
  2271.  
  2272.      TPFError    ...     0           - ok
  2273.                          1           - error
  2274.  
  2275.  
  2276.      --------------------------------------------------------------------------
  2277.      padcentre
  2278.  
  2279.  
  2280.      DESCRIPTION  ...    Pads a string to a specified length at any position
  2281.                          in a character.
  2282.  
  2283.      DECLERATION  ...    procedure padcentre (var s: stype; ch :char;
  2284.                                               position,length :integer);
  2285.  
  2286.  
  2287.      PARAMETERS   ...    s           - the string to be manipulated.
  2288.                          ch          - character used for padding
  2289.                          position    - the position at whic padding comences
  2290.                          length      - the new length of s
  2291.  
  2292.      TPFError    ...     0           - ok
  2293.                          1           - error
  2294.  
  2295.  
  2296.      --------------------------------------------------------------------------
  2297.      padends
  2298.  
  2299.  
  2300.      DESCRIPTION  ...    Extends a string by padding it at both ends.
  2301.  
  2302.      DECLERATION  ...    procedure padends(var s: stype; ch :char;
  2303.                                            length :integer);
  2304.  
  2305.  
  2306.      PARAMETERS   ...    s           - the string to be manipulated.
  2307.                          ch          - character used for padding
  2308.                          length      - the new length of s
  2309.  
  2310.      TPFError    ...     0           - ok
  2311.                          1           - error
  2312.  
  2313.  
  2314.      --------------------------------------------------------------------------
  2315.      padleft
  2316.  
  2317.  
  2318.      DESCRIPTION  ...    Pads the begining of a string and extends it a
  2319.                          specified length.
  2320.  
  2321.      DECLERATION  ...    procedure padleft(var s: stype; ch :char;
  2322.                                            length :integer);
  2323.  
  2324.  
  2325.      PARAMETERS   ...    s           - the string to be manipulated.
  2326.                          ch          - character used for padding
  2327.                          length      - new length of s
  2328.  
  2329.      TPFError    ...     0           - ok
  2330.                          1           - error
  2331.  
  2332.  
  2333.      --------------------------------------------------------------------------
  2334.      padright
  2335.  
  2336.  
  2337.      DESCRIPTION  ...    Pads the end of a string and extends it a specified
  2338.                          length.
  2339.  
  2340.      DECLERATION  ...    procedure padright(var s: stype; ch :char;
  2341.                                             length :integer);
  2342.  
  2343.  
  2344.      PARAMETERS   ...    s           - the string to be manipulated.
  2345.                          ch          - character used for padding
  2346.                          length      - new length of s
  2347.  
  2348.      TPFError    ...     0           - ok
  2349.                          1           - error
  2350.  
  2351.  
  2352.      --------------------------------------------------------------------------
  2353.      replace
  2354.  
  2355.  
  2356.      DESCRIPTION  ...    Deletes a specified number of characters and inserts
  2357.                          new substring.
  2358.  
  2359.      DECLERATION  ...    procedure replace(var s: stype; subs: stype;
  2360.                                            position,chars :integer);
  2361.  
  2362.  
  2363.  
  2364.      PARAMETERS   ...    s           - the string to be manipulated.
  2365.                          subs        - the string to be inserted
  2366.                          position    - the position at which replacement
  2367.                                        starts
  2368.                          chars       - the number of characters deleted prior
  2369.                                        to insertion.
  2370.  
  2371.      TPFError    ...     0           - ok
  2372.                          1           - error
  2373.  
  2374.  
  2375.      --------------------------------------------------------------------------
  2376.      rightend
  2377.  
  2378.  
  2379.      DESCRIPTION  ...    Return the right end of a string up to a specified
  2380.                          character.
  2381.  
  2382.      DECLERATION  ...    function rightend(var s: stype; border :char): stype;
  2383.  
  2384.  
  2385.      PARAMETERS   ...    s           - the string to be manipulated.
  2386.                          border      - the character at which the search stops
  2387.  
  2388.      RETURNS     ...     The new string.
  2389.  
  2390.  
  2391.      TPFError    ...     0           - ok
  2392.                          1           - character not found
  2393.  
  2394.  
  2395.      --------------------------------------------------------------------------
  2396.      seekstring
  2397.  
  2398.  
  2399.      DESCRIPTION  ...    Searches for a substring within a string.
  2400.  
  2401.      DECLERATION  ...    function seekstring (s,subs: stype;
  2402.                                             startpt :integer) :integer;
  2403.  
  2404.  
  2405.      PARAMETERS   ...    s           - the string to be manipulated.
  2406.                          subs        - the string that is searched
  2407.                          startpt     - the starting position of the search
  2408.  
  2409.      RETURNS     ...     The position of the substring.
  2410.  
  2411.      TPFError    ...     0           - ok
  2412.                          1           - error
  2413.  
  2414.  
  2415.      --------------------------------------------------------------------------
  2416.      stringend
  2417.  
  2418.  
  2419.      DESCRIPTION  ...    Returns a specified number of characters from the end
  2420.                          of a string.
  2421.  
  2422.      DECLERATION  ...    function stringend(s: stype; numberchars :integer)
  2423.                                             :stype;
  2424.  
  2425.      PARAMETERS   ...    s           - the string to be manipulated.
  2426.                          numberchars - the number of characters returned
  2427.  
  2428.      RETURNS     ...     The new string.
  2429.  
  2430.      TPFError    ...     0           - ok
  2431.                          1           - s is null
  2432.                          2           - other error
  2433.  
  2434.  
  2435.      --------------------------------------------------------------------------
  2436.      stringof
  2437.  
  2438.  
  2439.      DESCRIPTION  ...    Makes a new string made up of repetitions of a
  2440.                          substring.
  2441.  
  2442.      DECLERATION  ...    function stringof(s: stype; length :integer): stype;
  2443.  
  2444.  
  2445.      PARAMETERS   ...    s           - the string to be manipulated.
  2446.                          length      - length of the string returned.
  2447.  
  2448.      TPFError    ...     0           - ok
  2449.                          1           - error
  2450.  
  2451.  
  2452.      --------------------------------------------------------------------------
  2453.      uppercase
  2454.  
  2455.  
  2456.      DESCRIPTION  ...    Convert a string to uppercase.
  2457.  
  2458.      DECLERATION  ...    procedure uppercase(var s: stype);
  2459.  
  2460.  
  2461.      PARAMETERS   ...    s           - the string to be manipulated.
  2462.  
  2463.  
  2464.  
  2465.      --------------------------------------------------------------------------
  2466.      wordcount
  2467.  
  2468.  
  2469.      DESCRIPTION  ...    Counts the number of words in a string. A word is
  2470.                          considered to be any series of characters  not
  2471.                          including the space character (#32).
  2472.  
  2473.      DECLERATION  ...    function wordcount(s: stype) :integer;
  2474.  
  2475.      PARAMETERS   ...    s          the string to be manipulated.
  2476.  
  2477.  
  2478.